<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>2_1_1-3-属性插值</title>
</head>

<body>


  <!--载入vue.js-->
  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
  <div id="Application" style="text-align: center">
    <h1 v-bind:id="id1">这里是模板内容：<span>{{count}}</span>次点击</h1>
    <button v-on:click="clickButton">按钮</button>
  </div>

  <script>
    const App = {
      data() {
        return {
          count: 0,
          countHTML: "<span style='color:red;'>0</span>",
          id1: "h1",
        };
      },

      methods: {
        clickButton() {
          this.count = this.count + 1;
        },
      },
    };
    Vue.createApp(App).mount("#Application");
  </script>

  <style>
    #h1 {
      color: red;
    }
  </style>
</body>

</html>